package com.lantosec.hmrp.modules.eval.vo;

import com.lantosec.hmrp.modules.eval.entity.EvalItem;
import com.lantosec.hmrp.modules.eval.entity.EvalType;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 考评项目分类定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="EvalType对象", description="考评项目分类定义")
public class EvalTypeVO extends BaseVO<EvalType> {
    private static final long serialVersionUID = 1L;


    public EvalTypeVO(EvalType entity){
        this.evalTypeId = entity.getEvalTypeId();
        this.evalTypeName = entity.getEvalTypeName();
        this.evalTypeOrder = entity.getEvalTypeOrder();
        this.deptId = entity.getDeptId();
        this.managerId = entity.getManagerId();
        this.managerName = entity.getManagerName();
        this.parentId = entity.getParentId();
        this.leaf = entity.getLeaf();
    }

    @Override
    public EvalType convertToEntity(){
        return new EvalType(this);
    }


    @ApiModelProperty(value = "考评项目分类ID")
    private String evalTypeId;

    @ApiModelProperty(value = "考评项目分类名称")
    private String evalTypeName;

    @ApiModelProperty(value = "排序")
    private Integer evalTypeOrder;

    @ApiModelProperty(value = "部门ID")
    private String deptId;

    @ApiModelProperty(value = "管理人员ID")
    private String managerId;

    @ApiModelProperty(value = "管理人")
    private String managerName;

    @ApiModelProperty(value = "上级ID")
    private String parentId;

    @ApiModelProperty(value = "是否末级")
    private Integer leaf;
    @ApiModelProperty(value = "考评项目集合")
    private List<EvalDetailedItemVO> evalDetailedItemVOList;
    @ApiModelProperty(value = "考评任务事件加减总分")
    private BigDecimal rewardValueSum;
    @ApiModelProperty(value = "考评项目集合")
    private List<EvalItem> evalItemList;
    @ApiModelProperty(value = "考评记录ID")
    private Integer evalDetailedId;
}
